<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<title>我的收货地址_乐拍客</title>
 <#include "top.html">
<div class="wrap">
<div class="box">
<div class="content">
<div class="container980">

<#include "userleft.html">
<div class="mem_right">
    	
<#include "userinfo.html">

    <ul class="bidinfo_nav mar10" style="border-bottom:0;">
    <li class="thisclass"><a href="${base}/member/addresslist.htm" ><span>收货地址</span></a></li>
    <li class="other"><a href="${base}/member/addressinsert.htm" ><span>添加地址</span></a></li>
  </ul>
  <div class="mem_box  bpad10">
	<div class="mem_boxx">
  <div class="bidinfo_nav_txt01">
  		<span class="s_w2 txtcenter" style="width:80px;margin-left:10px;">收货人</span>
  		<span class="s_w2 txtcenter" style="width:70px;">联系电话</span>
		<span class="s_w2 txtcenter" style="width:250px;">地址</span>
		<span class="s_w2 txtcenter" style="width:70px;">邮政编码</span>
		<span class="s_w2 txtcenter">操作</span>
	</div>
	<#if useraddress??>
	<#list useraddress! as addr>
		<div id=address_${addr.id} class="mag_main"> 
		<span class="s_w2 txtcenter" style="width:80px;">${addr.reciver}</span>
		<span class="s_w2 txtcenter" style="width:70px;">${addr.phoneno}</span>
		<span class="s_w2 txtcenter" style="width:250px;">${addr.address}</span>
		<span class="s_w2 txtcenter" style="width:70px;">${addr.postcode!""}</span>
		<span class="s_w2 txtcenter"><a href="${base}/member/address_edit.htm?id=${addr.id}">编辑</a>
		<A HREF="javascript:deleteVal('${addr.id}','address_${addr.id}')">删除</A>
		</span> 
		</div>
	</#list>
    </#if>
		<!--订单结束-->
        
  </div>
  <div class="public_corner public_bottomleft"></div>
	<div class="public_corner public_bottomright"></div>
	</div>
	
	</div>
  <div class="clear"></div>
</div>
<script language="javascript" >

function deleteVal(id,actionobj)
{
	if(confirm('确认删除此条记录？删除后无法恢复'))
	{
		$.ajax({
			    type: 'get',
		        dataType: 'json',
		        data :{'id':id},
		        url: site_root+"/member/address_del.htm",
		        cache : false,
		        error: function(){
		            alert('系统繁忙，请稍后再试');   
		        },
		        success: function(data){
		        if(data.status=='success'){
		       		alert(data.message);
		           	$('#'+actionobj).remove();
					$('#'+actionobj+'next').remove();
		        }else{
		           alert(data.message);
		        }
		         return ;
		        }
		    });
		
		
	}
}
</script>
</div>
</div>
</div>
<!--底部-->
<br/>
<#include "foot.html">

</body>
</html>
<!--/底部-->